 var BrowserWindow = require('electron').remote.BrowserWindow
 var path = require('path')

 var newWindowBtn = document.getElementById('btn')
 var win;

 newWindowBtn.addEventListener('click', function(event) {
     //控制打开数量的
     if (win) return;
     const modalPath = path.join('file://', __dirname, '/guide.html')
     win = new BrowserWindow({
         width: 400,
         height: 400
     })
     win.webContents.openDevTools();
     win.on('close', function() {
         win = null
     })
     win.loadURL(modalPath)
     win.show()
 })